Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Casbin RBAC model at server side #65

Merged
merged 1 commit into from
Aug 26, 2020
Merged

Conversation

kingiw
Copy link
Contributor

@kingiw kingiw commented Aug 23, 2020

Signed-off-by: kingiw kingiw@hotmail.com

Temporarily, Casbin doesn't support RBAC+ABAC model (wait for the merge of casbin/casbin@7c9f78f), and I simply implement the RBAC part for enforce if a user is root moderator or node moderator by now.

The policies are inserted into our database.

go.mod Outdated Show resolved Hide resolved
object/file.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
go.sum Outdated Show resolved Hide resolved
go.sum Outdated Show resolved Hide resolved
go.sum Outdated
github.com/casbin/casbin/v2 v2.0.1/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/casbin/casbin/v2 v2.10.0 h1:hBGwn5dnOiA2agPwpedz0a3ke/OVnWksyoHm7dW/bWc=
github.com/casbin/casbin/v2 v2.10.0/go.mod h1:XXtYGrs/0zlOsJMeRteEdVi/FsB0ph7KgNfjoCoJUD8=
github.com/casbin/xorm-adapter v1.0.0 h1:AJq8+6BhmjD6Oajth8UUpuE/2RAX3PR+s/T98+4tQr8=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same again.

@hsluoyz hsluoyz requested a review from kocoler August 26, 2020 07:05
@hsluoyz
Copy link
Contributor

hsluoyz commented Aug 26, 2020

@kocoler please review.

go.sum Outdated Show resolved Hide resolved
object/file.go Outdated Show resolved Hide resolved
authz/util.go Outdated Show resolved Hide resolved
@kocoler
Copy link
Contributor

kocoler commented Aug 26, 2020

I just found some problems that conflict with my understanding of format.

Signed-off-by: kingiw <kingiw@hotmail.com>
@hsluoyz hsluoyz merged commit e7b47e2 into casibase:master Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants